<!-- *** START OF STYLESHEET *** 
Copyright 2007 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- **********************************************************************
 XSL to format the search output for Google Custom Search, Business Edition
     ********************************************************************** -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html"/>
	<!-- **********************************************************************
 Logo setup
     - whether to show logo: 0 for FALSE, 1 (or non-zero) for TRUE
     - logo url
     - logo size: '' for default image size
     ********************************************************************** -->
	<xsl:variable name="show_logo">1</xsl:variable>
	<xsl:variable name="logo_url">http://google.com/coop/images/google_coop_sm.gif</xsl:variable>
	<xsl:variable name="logo_width">150</xsl:variable>
	<xsl:variable name="logo_height">58</xsl:variable>
	<!-- **********************************************************************
 Global Style variables: '' for using browser's default
     ********************************************************************** -->
	<xsl:variable name="global_font">arial,sans-serif</xsl:variable>
	<xsl:variable name="global_font_size"></xsl:variable>
	<xsl:variable name="global_bg_color">#ffffff</xsl:variable>
	<xsl:variable name="global_text_color">#000000</xsl:variable>
	<xsl:variable name="global_link_color">#0000cc</xsl:variable>
	<xsl:variable name="global_vlink_color">#551a8b</xsl:variable>
	<xsl:variable name="global_alink_color">#ff0000</xsl:variable>

	<!-- *** search boxes *** -->
	<xsl:variable name="search_box_size">32</xsl:variable>

	<!-- *** choose search button type: 'text' or 'image' *** -->
	<!--<xsl:variable name="choose_search_button">text</xsl:variable>
	<xsl:variable name="search_button_text">Google Search</xsl:variable>
	<xsl:variable name="search_button_image_url"></xsl:variable>-->
	<!-- **********************************************************************
 Result page components
     - whether to show a component: 0 for FALSE, non-zero (e.g., 1) for TRUE
     - text and style
     ********************************************************************** -->
	<!-- *** choose result page header: '', 'provided', 'mine', or 'both' *** -->
	<!--<xsl:variable name="choose_result_page_header">both</xsl:variable>-->
	<!-- *** search info bars *** -->
	<xsl:variable name="show_search_info">1</xsl:variable>
	<!-- *** choose separation bar: 'ltblue', 'blue', 'line', 'nothing' *** -->
	<xsl:variable name="choose_sep_bar">ltblue</xsl:variable>
	<xsl:variable name="sep_bar_std_text"></xsl:variable>
	<xsl:variable name="sep_bar_error_text">Fout</xsl:variable>
	<!-- *** spelling suggestions *** -->
	<xsl:variable name="show_spelling">1</xsl:variable>
	<xsl:variable name="spelling_text">Bedoelde u:</xsl:variable>
	<xsl:variable name="spelling_text_color">#cc0000</xsl:variable>
	<!-- **********************************************************************
 Result elements
     - whether to show an element ('1' for yes, '0' for no)
     - font/size/color ('' for using style of the context)
     ********************************************************************** -->
	<!-- *** result title and snippet *** -->
	<xsl:variable name="show_res_title">1</xsl:variable>
	<xsl:variable name="res_title_color">#0000cc</xsl:variable>
	<xsl:variable name="res_title_size"></xsl:variable>
	<xsl:variable name="show_res_snippet">1</xsl:variable>
	<xsl:variable name="res_snippet_size">80%</xsl:variable>
	<!-- *** keyword match (in title or snippet) *** -->
	<xsl:variable name="res_keyword_color"></xsl:variable>
	<xsl:variable name="res_keyword_size"></xsl:variable>
	<xsl:variable name="res_keyword_format">b</xsl:variable>
	<!-- 'b' for bold -->
	<!-- *** link URL *** -->
	<xsl:variable name="show_res_url">1</xsl:variable>
	<xsl:variable name="res_url_color">#008000</xsl:variable>
	<xsl:variable name="res_url_size">-1</xsl:variable>
	<xsl:variable name="truncate_result_urls">1</xsl:variable>
	<xsl:variable name="truncate_result_url_length">100</xsl:variable>
	<!-- *** misc elements *** -->
	<xsl:variable name="show_meta_tags">0</xsl:variable>
	<xsl:variable name="show_res_size">1</xsl:variable>
	<xsl:variable name="show_res_date">1</xsl:variable>
	<!-- *** used in result cache link, similar pages link, and description *** -->
	<xsl:variable name="faint_color">#7777cc</xsl:variable>
	<!-- **********************************************************************
 Other variables
     ********************************************************************** -->
	<!-- *** page title *** -->
	<xsl:variable name="result_page_title">Zoekresultaten</xsl:variable>
	<xsl:variable name="error_page_title">Fout</xsl:variable>
	<!-- *** error message text *** -->
	<xsl:variable name="server_error_msg_text">Een serverfout heeft zich voorgedaan.</xsl:variable>
	<xsl:variable name="server_error_des_text">Controleer gedetailleerde server response code.</xsl:variable>
	<xsl:variable name="xml_error_msg_text">Onbekend XML resultaattype.</xsl:variable>
	<xsl:variable name="xml_error_des_text">Paginabron bekijken om fout in de XML te zien.</xsl:variable>
	<!-- **********************************************************************
 My global page header/footer
     ********************************************************************** -->
	<xsl:template name="my_page_header">
		<!-- *** replace the following with your own xhtml code or replace the text
   between the xsl:text tags with html escaped html code *** -->
		<xsl:text disable-output-escaping="yes"> &lt;!-- Please enter html code below. --&gt;</xsl:text>
	</xsl:template>

	<xsl:template name="my_page_footer">
		<span class="p">
			<xsl:text disable-output-escaping="yes"> &lt;!-- Please enter html code below. --&gt;</xsl:text>
		</span>
	</xsl:template>
	<!-- **********************************************************************
 Logo template
     ********************************************************************** -->
	<xsl:template name="logo">
		<a href="http://www.google.com/coop">
			<img src="{$logo_url}"
      width="{$logo_width}" height="{$logo_height}"
      alt="Go to Google Home" border="0" />
		</a>
	</xsl:template>
	<!-- **********************************************************************
 Search result page header: logo and search box
     ********************************************************************** -->
	<xsl:template name="result_page_header">
		<table border="0" cellpadding="0" cellspacing="0">
			<xsl:if test="$show_logo != '0'">
				<tr>
					<td rowspan="3" valign="top">
						<xsl:call-template name="logo"/>
						<xsl:call-template name="nbsp3"/>
					</td>
				</tr>
			</xsl:if>
			<tr>
				<td valign="middle">
					<!--<xsl:call-template name="search_box">
						<xsl:with-param name="type" select="'std_top'"/>
					</xsl:call-template>-->
				</td>
			</tr>
		</table>
	</xsl:template>

	<!-- **********************************************************************
 Separation bar variables
     ********************************************************************** -->
	<xsl:variable name="sep_bar_border_color">
		<xsl:choose>
			<xsl:when test="$choose_sep_bar = 'ltblue'">#3366cc</xsl:when>
			<xsl:when test="$choose_sep_bar = 'blue'">#3366cc</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$global_bg_color"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>

	<xsl:variable name="sep_bar_bg_color">
		<xsl:choose>
			<xsl:when test="$choose_sep_bar = 'ltblue'">#e5ecf9</xsl:when>
			<xsl:when test="$choose_sep_bar = 'blue'">#3366cc</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$global_bg_color"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>

	<xsl:variable name="sep_bar_text_color">
		<xsl:choose>
			<xsl:when test="$choose_sep_bar = 'ltblue'">#000000</xsl:when>
			<xsl:when test="$choose_sep_bar = 'blue'">#ffffff</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$global_text_color"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<!-- **********************************************************************
 Empty result set
     ********************************************************************** -->
	<xsl:template name="no_RES">
		<xsl:param name="query"/>

		<span class="p">
			<br/>
			Uw zoekbewerking - <b>
				<xsl:value-of select="$query"/>
			</b> - heeft geen overeenkomstige documenten opgeleverd.
			<br/>
			Er zijn geen resultaten gevonden die  <b>
				"<xsl:value-of select="$query"/>" </b>bevatten.			
			<br/>
			<br/>
			Suggestie:
			<ul>
				<li>Zorg ervoor dat alle woorden goed gespeld zijn.</li>
				<li>Probeer andere zoektermen.</li>
				<li>Maak de zoektermen algemener.</li>
				<li>Gebruik minder zoekwoorden.</li>
			</ul>
		</span>

	</xsl:template>

	<!-- **********************************************************************
 Global Style
        default font type/size/color, background color, link color
         using HTML CSS (Cascading Style Sheets)
     ********************************************************************** -->
	<xsl:template name="style">
		<style>
			<xsl:comment>
				body,td,div,b,.p,a,.d,.s{font-family:<xsl:value-of select="$global_font"/>}
				body,td,div,b,.p,a,.d{font-size: <xsl:value-of select="$global_font_size"/>}
				body,div,td,b,.p,.s{color:<xsl:value-of select="$global_text_color"/>}
				
				.s{font-size: <xsl:value-of select="$res_snippet_size"/>}
				.g{margin-top: 1em; margin-bottom: 1em}
				.s td{width:34em}
				.l{font-size: <xsl:value-of select="$res_title_size"/>}
				.l{color: <xsl:value-of select="$res_title_color"/>}
				a:link,.w,.w a:link{color:<xsl:value-of select="$global_link_color"/>}
				.f,.f:link,.f a:link{color:<xsl:value-of select="$faint_color"/>}
				a:visited,.f a:visited{color:<xsl:value-of select="$global_vlink_color"/>}
				a:active,.f a:active{color:<xsl:value-of select="$global_alink_color"/>}
				.t{color:<xsl:value-of select="$sep_bar_text_color"/>}
				.t{background-color:<xsl:value-of select="$sep_bar_bg_color"/>}
				.z{display:none}
				.i,.i:link{color:#a90a08}
				.a,.a:link{color:<xsl:value-of select="$res_url_color"/>}
				div.n {margin-top: 1ex}
				.n a{font-size: 10pt; color:<xsl:value-of select="$global_text_color"/>}
				.n .i{font-size: 10pt; font-weight:bold}
				.q a:visited,.q a:link,.q a:active,.q {color:#0000cc;}
				.b,.b a{font-size: 12pt; color:#0000cc; font-weight:bold}
				.d{margin-right:1em; margin-left:1em;}
				div.oneboxResults {max-height:150px;overflow:hidden;}
			</xsl:comment>
		</style>
	</xsl:template>

	<!-- *** base_url: collection info *** -->
	<xsl:variable name="base_url">
		<xsl:for-each
		  select="/GSP/PARAM[@name = 'client' or
                     @name = 'site' or
                     @name = 'num' or
                     @name = 'cx' or
                     @name = 'analyticsId' or
                     @name = 'xslt' or
                     @name = 'output' or
                     @name = 'lr' or
                     @name = 'ie']">
			<xsl:value-of select="@name"/>=<xsl:value-of select="@original_value"/>
			<xsl:if test="position() != last()">&amp;</xsl:if>
		</xsl:for-each>
	</xsl:variable>
	<!-- *** search_url *** -->
	<xsl:variable name="search_url">
		<xsl:for-each select="/GSP/PARAM[(@name != 'start') and
                                   (@name != 'epoch') and
                     not(starts-with(@name, 'metabased_'))]">
			<xsl:value-of select="@name"/>
			<xsl:text>=</xsl:text>
			<xsl:value-of select="@original_value"/>
			<xsl:if test="position() != last()">
				<xsl:text disable-output-escaping="yes">&amp;</xsl:text>
			</xsl:if>
		</xsl:for-each>
	</xsl:variable>

	<!-- **********************************************************************
 Search Parameters
     ********************************************************************** -->
	<!-- *** num_results: actual num_results per page *** -->
	<xsl:variable name="num_results">
		<xsl:choose>
			<xsl:when test="/GSP/PARAM[(@name='num') and (@value!='')]">
				<xsl:value-of select="/GSP/PARAM[@name='num']/@value"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="10"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>

	<!-- *** space_normalized_query: q = /GSP/Q *** -->
	<xsl:variable name="qval">
		<xsl:value-of select="/GSP/Q"/>
	</xsl:variable>

	<xsl:variable name="space_normalized_query">
		<xsl:value-of select="normalize-space($qval)"
		  disable-output-escaping="yes"/>
	</xsl:variable>

	<!-- **********************************************************************
 Figure out what kind of page this is 
     ********************************************************************** -->
	<xsl:template match="GSP">
		<xsl:choose>
			<xsl:when test="Q">
				<xsl:call-template name="search_results"/>
			</xsl:when>
			<xsl:when test="ERROR">
				<xsl:call-template name="error_page">
					<xsl:with-param name="errorMessage" select="$server_error_msg_text"/>
					<xsl:with-param name="errorDescription" select="$server_error_des_text"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="error_page">
					<xsl:with-param name="errorMessage" select="$xml_error_msg_text"/>
					<xsl:with-param name="errorDescription" select="$xml_error_des_text"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="escape_quot">
		<xsl:param name="string"/>
		<xsl:call-template name="replace_string">
			<xsl:with-param name="find" select="'&quot;'"/>
			<xsl:with-param name="replace" select="'&amp;quot;'"/>
			<xsl:with-param name="string" select="$string"/>
		</xsl:call-template>
	</xsl:template>

	<!-- **********************************************************************
 Search results
     ********************************************************************** -->
	<xsl:template name="search_results">
		<html>

			<!-- *** HTML header and style *** -->
			<xsl:call-template name="langHeadStart"/>
			<title>
				<xsl:value-of select="$result_page_title"/>:
				<xsl:value-of select="$space_normalized_query"/>
			</title>
			<xsl:call-template name="style"/>
			<xsl:if test="/GSP/PARAM[(@name='analyticsId')]">
				<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
				<script type="text/javascript">
					_uacct="<xsl:value-of select="GSP/PARAM[(@name='analyticsId')]/@value"/>";
					urchinTracker();
				</script>
			</xsl:if>
			<script type="text/javascript">
				<xsl:comment>
					function resetForms() {
					for (var i = 0; i &lt; document.forms.length; i++ ) {
					document.forms[i].reset();
					}
					}
					//
				</xsl:comment>
			</script>
			<xsl:call-template name="langHeadEnd"/>

			<body onLoad="resetForms()" dir="ltr">

				<!-- *** Customer's own result page header *** -->
				<!--
				<xsl:if test="$choose_result_page_header = 'mine' or
                $choose_result_page_header = 'both'">
					<xsl:call-template name="my_page_header"/>
				</xsl:if>-->

				<!-- *** Result page header *** -->
				<!--
				<xsl:if test="$choose_result_page_header = 'provided' or
                $choose_result_page_header = 'both'">
					<xsl:call-template name="result_page_header" />
				</xsl:if>-->

				<!-- *** Top separation bar *** -->
				<xsl:if test="Q != ''">
					<xsl:call-template name="top_sep_bar">
						<xsl:with-param name="text" select="$sep_bar_std_text"/>
						<xsl:with-param name="show_info" select="$show_search_info"/>
						<xsl:with-param name="time" select="TM"/>
					</xsl:call-template>
				</xsl:if>

				<!-- *** Handle results (if any) *** -->
				<xsl:choose>
					<xsl:when test="RES or GM or Spelling">
						<xsl:call-template name="results">
							<xsl:with-param name="query" select="Q"/>
							<xsl:with-param name="time" select="TM"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="Q=''">
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="no_RES">
							<xsl:with-param name="query" select="Q"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>



				<!-- *** Customer's own result page footer *** -->
				<xsl:call-template name="my_page_footer"/>

				<!-- *** HTML footer *** -->
			</body>
		</html>

	</xsl:template>
	<!-- **********************************************************************
  Search box input form (Types: std_top, std_bottom, home, swr)
     ********************************************************************** -->
	<!--<xsl:template name="search_box">
		<xsl:param name="type"/>

		<form name="gs" method="GET" action="search">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td valign="middle">
									<font size="-1">
										<input type="text" name="q" size="{$search_box_size}" maxlength="256" value="{$space_normalized_query}"/>
									</font>
								</td>
								<td valign="middle">
									<font size="-1">
										<xsl:call-template name="nbsp"/>
										<xsl:choose>
											<xsl:when test="$choose_search_button = 'image'">
												<input type="image" name="btnG" src="{$search_button_image_url}"
											   valign="bottom" width="60" height="26"
											   border="0" value="{$search_button_text}"/>
											</xsl:when>
											<xsl:otherwise>
												<input type="submit" name="btnG" value="{$search_button_text}"/>
											</xsl:otherwise>
										</xsl:choose>
									</font>
								</td>
								<td nowrap="1">
									<font size="-1">
										<xsl:if test="/GSP/Context/title">
											<xsl:call-template name="nbsp3"/>
											<b>CSE Title/Description: </b>
											<xsl:value-of select="/GSP/Context/title"/>
										</xsl:if>
									</font>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<xsl:text>
    </xsl:text>
			<xsl:call-template name="form_params"/>
		</form>
	</xsl:template>-->
	<!-- *** form_params: parameters carried by the search input form *** -->
	<xsl:template name="form_params">
		<xsl:for-each
		  select="PARAM[@name != 'q' and
                  @name != 'ie' and
                  not(contains(@name, 'as_')) and
                  @name != 'btnG' and
                  @name != 'btnI' and
                  @name != 'site' and
                  @name != 'filter' and
                  @name != 'swrnum' and
                  @name != 'start' and
                  @name != 'access' and
                  @name != 'ip' and
                  @name != 'epoch' and
                  not(starts-with(@name ,'metabased_'))]">
			<input type="hidden" name="{@name}" value="{@value}" />

			<xsl:if test="@name = 'oe'">
				<input type="hidden" name="ie" value="{@value}" />
			</xsl:if>
			<xsl:text>
    </xsl:text>
		</xsl:for-each>
	</xsl:template>
	<!-- **********************************************************************
 Output all results
     ********************************************************************** -->
	<xsl:template name="results">
		<xsl:param name="query"/>
		<xsl:param name="time"/>

		<!-- *** Handle spelling suggestions, if any *** -->
		<xsl:if test="$show_spelling != '0'">
			<xsl:call-template name="spelling"/>
		</xsl:if>
		<!-- *** Output results details *** -->
		<div>

			<!-- for real results -->
			<xsl:apply-templates select="RES/R">
				<xsl:with-param name="query" select="$query"/>
			</xsl:apply-templates>

			<!-- *** Filter note (if needed) *** -->
			<xsl:if test="(RES/FI) and (not(RES/NB/NU))">
				<p>
					<i>
						Om de meest relevante resultaten te tonen, hebben we er een aantal weggelaten die heel sterk lijken op de reeds weergegeven <xsl:value-of select="RES/@EN"/>.<br/>
					</i>
				</p>
			</xsl:if>
		</div>

		<xsl:call-template name="google_navigation">
			<xsl:with-param name="prev" select="RES/NB/PU"/>
			<xsl:with-param name="next" select="RES/NB/NU"/>
			<xsl:with-param name="view_begin" select="RES/@SN"/>
			<xsl:with-param name="view_end" select="RES/@EN"/>
			<xsl:with-param name="guess" select="RES/M"/>
			<xsl:with-param name="navigation_style" select="'top'"/>
		</xsl:call-template>

	</xsl:template>

	<!-- **********************************************************************
 Spelling suggestions in result page
     ********************************************************************** -->
	<xsl:template name="spelling">
		<xsl:if test="/GSP/Spelling/Suggestion">
			<p>
				<span class="p">
					<font color="{$spelling_text_color}">
						<xsl:value-of select="$spelling_text"/>
						<xsl:call-template name="nbsp"/>
					</font>
				</span>
				<a href="?q={/GSP/Spelling/Suggestion[1]/@q}&amp;spell=1&amp;{$base_url}">
					<xsl:value-of disable-output-escaping="yes"
					  select="/GSP/Spelling/Suggestion[1]"/>
				</a>
			</p>
		</xsl:if>
	</xsl:template>
	<!-- **********************************************************************
 Truncation functions 
     ********************************************************************** -->
	<xsl:template name="truncate_url">
		<xsl:param name="t_url"/>
		<xsl:choose>
			<xsl:when test="string-length($t_url) &lt; $truncate_result_url_length">
				<xsl:value-of select="$t_url"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="first" select="substring-before($t_url, '/')"/>
				<xsl:variable name="last">
					<xsl:call-template name="truncate_find_last_token">
						<xsl:with-param name="t_url" select="$t_url"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="path_limit" select="$truncate_result_url_length - (string-length($first) + string-length($last) + 1)"/>

				<xsl:choose>
					<xsl:when test="$path_limit &lt;= 0">
						<xsl:value-of select="concat(substring($t_url, 1, $truncate_result_url_length), '...')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:variable name="chopped_path">
							<xsl:call-template name="truncate_chop_path">
								<xsl:with-param name="path" select="substring($t_url, string-length($first) + 2, string-length($t_url) - (string-length($first) + string-length($last) + 1))"/>
								<xsl:with-param name="path_limit" select="$path_limit"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:value-of select="concat($first, '/.../', $chopped_path, $last)"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="truncate_find_last_token">
		<xsl:param name="t_url"/>
		<xsl:choose>
			<xsl:when test="contains($t_url, '/')">
				<xsl:call-template name="truncate_find_last_token">
					<xsl:with-param name="t_url" select="substring-after($t_url, '/')"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$t_url"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="truncate_chop_path">
		<xsl:param name="path"/>
		<xsl:param name="path_limit"/>
		<xsl:choose>
			<xsl:when test="string-length($path) &lt;= $path_limit">
				<xsl:value-of select="$path"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="truncate_chop_path">
					<xsl:with-param name="path" select="substring-after($path, '/')"/>
					<xsl:with-param name="path_limit" select="$path_limit"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- **********************************************************************
  A single result
     ********************************************************************** -->
	<xsl:template match="R">
		<xsl:param name="query"/>
		<xsl:variable name="display_url_tmp" select="substring-after(UD, '://')"/>
		<xsl:variable name="display_url">
			<xsl:choose>
				<xsl:when test="$display_url_tmp">
					<xsl:value-of select="$display_url_tmp"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="substring-after(U, '://')"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="escaped_url" select="substring-after(UE, '://')"/>
		<xsl:variable name="protocol" select="substring-before(U, '://')"/>
		<xsl:variable name="full_url" select="UE"/>
		<xsl:variable name="crowded_url" select="HN/@U"/>
		<xsl:variable name="crowded_display_url" select="HN"/>
		<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
		<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>

		<xsl:variable name="temp_url" select="substring-after(U, '://')"/>
		<xsl:variable name="stripped_url">
			<xsl:choose>
				<xsl:when test="$truncate_result_urls != '0'">
					<xsl:call-template name="truncate_url">
						<xsl:with-param name="t_url" select="$display_url"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$display_url"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>

		<!-- *** Indent as required (only supports 2 levels) *** -->
		<xsl:if test="@L='2'">
			<xsl:text disable-output-escaping="yes">&lt;blockquote class=&quot;g&quot;&gt;</xsl:text>
		</xsl:if>

		<!-- *** Result Header *** -->
		<p class="g">

			<!-- *** Result Title (including PDF tag and hyperlink) *** -->
			<xsl:if test="$show_res_title != '0'">
				<font size="-2">
					<b>
						<xsl:choose>
							<xsl:when test="@MIME='text/html' or @MIME='' or not(@MIME)"></xsl:when>
							<xsl:when test="@MIME='text/plain'">[TEXT]</xsl:when>
							<xsl:when test="@MIME='application/rtf'">[RTF]</xsl:when>
							<xsl:when test="@MIME='application/pdf'">[PDF]</xsl:when>
							<xsl:when test="@MIME='application/postscript'">[PS]</xsl:when>
							<xsl:when test="@MIME='application/vnd.ms-powerpoint'">[MS POWERPOINT]</xsl:when>
							<xsl:when test="@MIME='application/vnd.ms-excel'">[MS EXCEL]</xsl:when>
							<xsl:when test="@MIME='application/msword'">[MS WORD]</xsl:when>
							<xsl:otherwise>
								<xsl:variable name="extension">
									<xsl:call-template name="last_substring_after">
										<xsl:with-param name="string" select="substring-after(
                                                  substring-after(U,'://'),
                                                  '/')"/>
										<xsl:with-param name="separator" select="'.'"/>
										<xsl:with-param name="fallback" select="'UNKNOWN'"/>
									</xsl:call-template>
								</xsl:variable>
								[<xsl:value-of select="translate($extension,$lower,$upper)"/>]
							</xsl:otherwise>
						</xsl:choose>
					</b>
				</font>
				<xsl:text> </xsl:text>

				<xsl:text disable-output-escaping='yes'>&lt;a href="</xsl:text>
				<xsl:value-of disable-output-escaping='yes' select="U"/>
				<xsl:text disable-output-escaping='yes'>"&gt;</xsl:text>
				<span class="l">
					<xsl:choose>
						<xsl:when test="T">
							<xsl:call-template name="reformat_keyword">
								<xsl:with-param name="orig_string" select="T"/>
							</xsl:call-template>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$stripped_url"/>
						</xsl:otherwise>
					</xsl:choose>
				</span>
				<xsl:text disable-output-escaping='yes'>&lt;/a&gt;</xsl:text>
			</xsl:if>


			<!-- *** Snippet Box *** -->
			<table cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="s">
						<xsl:if test="$show_res_snippet != '0'">
							<xsl:call-template name="reformat_keyword">
								<xsl:with-param name="orig_string" select="S"/>
							</xsl:call-template>
						</xsl:if>

						<!-- *** Meta tags *** -->
						<xsl:if test="$show_meta_tags != '0'">
							<xsl:apply-templates select="MT"/>
						</xsl:if>

						<!-- *** URL *** -->
						<br/>
						<font color="{$res_url_color}" size="{$res_url_size}">
							<xsl:if test="$show_res_url != '0'">
								<xsl:value-of select="$stripped_url"/>
							</xsl:if>
						</font>
					</td>
				</tr>
			</table>
		</p>

		<!-- *** End indenting as required (only supports 2 levels) *** -->
		<xsl:if test="@L='2'">
			<xsl:text disable-output-escaping="yes">&lt;/blockquote&gt;</xsl:text>
		</xsl:if>

	</xsl:template>

	<!-- **********************************************************************
  Meta tag values within a result 
     ********************************************************************** -->
	<xsl:template match="MT">
		<br/>
		<span class="f">
			<xsl:value-of select="@N"/>:
		</span>
		<xsl:value-of select="@V"/>
	</xsl:template>

	<!-- **********************************************************************
  Variables for reformatting keyword-match display 
     ********************************************************************** -->
	<xsl:variable name="keyword_orig_start" select="'&lt;b&gt;'"/>
	<xsl:variable name="keyword_orig_end" select="'&lt;/b&gt;'"/>

	<xsl:variable name="keyword_reformat_start">
		<xsl:if test="$res_keyword_format">
			<xsl:text>&lt;</xsl:text>
			<xsl:value-of select="$res_keyword_format"/>
			<xsl:text>&gt;</xsl:text>
		</xsl:if>
		<xsl:if test="($res_keyword_size) or ($res_keyword_color)">
			<xsl:text>&lt;font</xsl:text>
			<xsl:if test="$res_keyword_size">
				<xsl:text> size="</xsl:text>
				<xsl:value-of select="$res_keyword_size"/>
				<xsl:text>"</xsl:text>
			</xsl:if>
			<xsl:if test="$res_keyword_color">
				<xsl:text> color="</xsl:text>
				<xsl:value-of select="$res_keyword_color"/>
				<xsl:text>"</xsl:text>
			</xsl:if>
			<xsl:text>&gt;</xsl:text>
		</xsl:if>
	</xsl:variable>

	<xsl:variable name="keyword_reformat_end">
		<xsl:if test="($res_keyword_size) or ($res_keyword_color)">
			<xsl:text>&lt;/font&gt;</xsl:text>
		</xsl:if>
		<xsl:if test="$res_keyword_format">
			<xsl:text>&lt;/</xsl:text>
			<xsl:value-of select="$res_keyword_format"/>
			<xsl:text>&gt;</xsl:text>
		</xsl:if>
	</xsl:variable>

	<!-- **********************************************************************
  Reformat the keyword match display in a title/snippet string
     ********************************************************************** -->
	<xsl:template name="reformat_keyword">
		<xsl:param name="orig_string"/>

		<xsl:variable name="reformatted_1">
			<xsl:call-template name="replace_string">
				<xsl:with-param name="find" select="$keyword_orig_start"/>
				<xsl:with-param name="replace" select="$keyword_reformat_start"/>
				<xsl:with-param name="string" select="$orig_string"/>
			</xsl:call-template>
		</xsl:variable>

		<xsl:variable name="reformatted_2">
			<xsl:call-template name="replace_string">
				<xsl:with-param name="find" select="$keyword_orig_end"/>
				<xsl:with-param name="replace" select="$keyword_reformat_end"/>
				<xsl:with-param name="string" select="$reformatted_1"/>
			</xsl:call-template>
		</xsl:variable>

		<xsl:value-of disable-output-escaping='yes' select="$reformatted_2"/>
	</xsl:template>
	<!-- **********************************************************************
 Google navigation bar in result page (do not customize)
     ********************************************************************** -->
	<xsl:template name="google_navigation">
		<xsl:param name="prev"/>
		<xsl:param name="next"/>
		<xsl:param name="view_begin"/>
		<xsl:param name="view_end"/>
		<xsl:param name="guess"/>
		<xsl:param name="navigation_style"/>

		<xsl:variable name="fontclass">
			<xsl:choose>
				<xsl:when test="$navigation_style = 'top'">s</xsl:when>
				<xsl:otherwise>b</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>

		<!-- *** Test to see if we should even show navigation *** -->
		<xsl:if test="($prev) or ($next)">

			<!-- *** Start Google result navigation bar *** -->

			<xsl:if test="$navigation_style != 'top'">
				<xsl:text disable-output-escaping="yes">&lt;center&gt;
        &lt;div class=&quot;n&quot;&gt;</xsl:text>
			</xsl:if>

			<table border="0" cellpadding="0" width="1%" cellspacing="0">
				<tr align="center" valign="top">
					<xsl:if test="$navigation_style != 'top'">
						<td valign="bottom" nowrap="1">
							<font size="-1">
								Resultaatpagina<xsl:call-template name="nbsp"/>
							</font>
						</td>
					</xsl:if>


					<!-- *** Show previous navigation, if available *** -->
					<xsl:choose>
						<xsl:when test="$prev">
							<td nowrap="1">

								<span class="{$fontclass}">
									<a href="?{$search_url}&amp;start={$view_begin -
                      $num_results - 1}">
										<xsl:if test="$navigation_style = 'google'">

											<img src="images/nav_previous.gif" width="68" height="26"
											  alt="Previous" border="0"/>
											<br/>
										</xsl:if>
										<xsl:if test="$navigation_style = 'top'">
											<xsl:text>&lt;</xsl:text>
										</xsl:if>
										<xsl:text>Vorige</xsl:text>
									</a>
								</span>
								<xsl:if test="$navigation_style != 'google'">
									<xsl:call-template name="nbsp"/>
								</xsl:if>
							</td>
						</xsl:when>
						<xsl:otherwise>
							<td nowrap="1">
								<xsl:if test="$navigation_style = 'google'">
									<img src="images/nav_first.gif" width="18" height="26"
									  alt="First" border="0"/>
									<br/>
								</xsl:if>
							</td>
						</xsl:otherwise>
					</xsl:choose>

					<xsl:if test="($navigation_style = 'google') or
                      ($navigation_style = 'link')">
						<!-- *** Google result set navigation *** -->
						<xsl:variable name="mod_end">
							<xsl:choose>
								<xsl:when test="$next">
									<xsl:value-of select="$guess"/>
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="$view_end"/>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:variable>

						<xsl:call-template name="result_nav">
							<xsl:with-param name="start" select="0"/>
							<xsl:with-param name="end" select="$mod_end"/>
							<xsl:with-param name="current_view" select="($view_begin)-1"/>
							<xsl:with-param name="navigation_style" select="$navigation_style"/>
						</xsl:call-template>
					</xsl:if>

					<!-- *** Show next navigation, if available *** -->
					<xsl:choose>
						<xsl:when test="$next">
							<td nowrap="1">
								<xsl:if test="$navigation_style != 'google'">
									<xsl:call-template name="nbsp"/>
								</xsl:if>
								<span class="{$fontclass}">
									<a href="?{$search_url}&amp;start={$view_begin +
                $num_results - 1}">
										<xsl:if test="$navigation_style = 'google'">

											<img src="images/nav_next.gif" width="100" height="26"

											  alt="Next" border="0"/>
											<br/>
										</xsl:if>
										<xsl:text>Volgende</xsl:text>
										<xsl:if test="$navigation_style = 'top'">
											<xsl:text>&gt;</xsl:text>
										</xsl:if>
									</a>
								</span>
							</td>
						</xsl:when>
						<xsl:otherwise>
							<td nowrap="1">
								<xsl:if test="$navigation_style != 'google'">
									<xsl:call-template name="nbsp"/>
								</xsl:if>
								<xsl:if test="$navigation_style = 'google'">
									<img src="images/nav_last.gif" width="46" height="26"

									  alt="Last" border="0"/>
									<br/>
								</xsl:if>
							</td>
						</xsl:otherwise>
					</xsl:choose>

					<!-- *** End Google result bar *** -->
				</tr>
			</table>

			<xsl:if test="$navigation_style != 'top'">
				<xsl:text disable-output-escaping="yes">&lt;/div&gt;
        &lt;/center&gt;</xsl:text>
			</xsl:if>
		</xsl:if>
	</xsl:template>


	<!-- **********************************************************************
 Helper templates for generating Google result navigation (do not customize)
   only shows 10 sets up or down from current view
     ********************************************************************** -->
	<xsl:template name="result_nav">
		<xsl:param name="start" select="'0'"/>
		<xsl:param name="end"/>
		<xsl:param name="current_view"/>
		<xsl:param name="navigation_style"/>

		<!-- *** Choose how to show this result set *** -->
		<xsl:choose>
			<xsl:when test="($start)&lt;(($current_view)-(10*($num_results)))">
			</xsl:when>
			<xsl:when test="(($current_view)&gt;=($start)) and
                    (($current_view)&lt;(($start)+($num_results)))">
				<td>
					<xsl:if test="$navigation_style = 'google'">
						<img src="images/nav_current.gif" width="16" height="26" alt="Current"/>
						<br/>
					</xsl:if>
					<xsl:if test="$navigation_style = 'link'">
						<xsl:call-template name="nbsp"/>
					</xsl:if>
					<span class="i">
						<xsl:value-of
          select="(($start)div($num_results))+1"/>
					</span>
					<xsl:if test="$navigation_style = 'link'">
						<xsl:call-template name="nbsp"/>
					</xsl:if>
				</td>
			</xsl:when>
			<xsl:otherwise>
				<td>
					<xsl:if test="$navigation_style = 'link'">
						<xsl:call-template name="nbsp"/>
					</xsl:if>
					<a href="?{$search_url}&amp;start={$start}">
						<xsl:if test="$navigation_style = 'google'">
							<img src="images/nav_page.gif" width="16" height="26" alt="Navigation"
								 border="0"/>
							<br/>
						</xsl:if>
						<xsl:value-of select="(($start)div($num_results))+1"/>
					</a>
					<xsl:if test="$navigation_style = 'link'">
						<xsl:call-template name="nbsp"/>
					</xsl:if>
				</td>
			</xsl:otherwise>
		</xsl:choose>

		<!-- *** Recursively iterate through result sets to display *** -->
		<xsl:if test="((($start)+($num_results))&lt;($end)) and
                ((($start)+($num_results))&lt;(($current_view)+
                (10*($num_results))))">
			<xsl:call-template name="result_nav">
				<xsl:with-param name="start" select="$start+$num_results"/>
				<xsl:with-param name="end" select="$end"/>
				<xsl:with-param name="current_view" select="$current_view"/>
				<xsl:with-param name="navigation_style" select="$navigation_style"/>
			</xsl:call-template>
		</xsl:if>

	</xsl:template>

	<!-- **********************************************************************
 Top separation bar 
     ********************************************************************** -->
	<xsl:template name="top_sep_bar">
		<xsl:param name="text"/>
		<xsl:param name="show_info"/>
		<xsl:param name="time"/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td bgcolor="{$sep_bar_border_color}">
					<img width="1" height="1" alt=""/>
				</td>
			</tr>
		</table>
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td nowrap="1" width="1%">
					<font size="+1">
						<xsl:call-template name="nbsp"/>
						<b>
							<xsl:value-of select="$text"/>
						</b>
					</font>
				</td>
				<td nowrap="1" align="right">
					<xsl:if test="$show_info != '0'">
						<font size="-1">
							<xsl:if test="count(/GSP/RES/R)>0 ">
								Resultaten  <b>
									<xsl:value-of select="RES/@SN"/>
								</b> - <b>
									<xsl:value-of select="RES/@EN"/>
								</b> van  <b>
									<xsl:value-of select="RES/M"/>
								</b> voor <b>
									<xsl:value-of select="$space_normalized_query"/>
								</b>.
							</xsl:if>
							Het zoeken duurde <b>
								<xsl:value-of select="round($time * 100.0) div 100.0"/>
							</b> seconden.
						</font>
					</xsl:if>
				</td>
			</tr>
		</table>
		<hr class="z"/>
		<xsl:if test="$choose_sep_bar = 'line'">
			<hr size="1" color="gray"/>
		</xsl:if>
	</xsl:template>




	<!-- **********************************************************************
 Utility functions for generating html entities
     ********************************************************************** -->
	<xsl:template name="nbsp">
		<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
	</xsl:template>
	<xsl:template name="nbsp3">
		<xsl:call-template name="nbsp"/>
		<xsl:call-template name="nbsp"/>
		<xsl:call-template name="nbsp"/>
	</xsl:template>
	<xsl:template name="nbsp4">
		<xsl:call-template name="nbsp3"/>
		<xsl:call-template name="nbsp"/>
	</xsl:template>
	<xsl:template name="quot">
		<xsl:text disable-output-escaping="yes">&amp;quot;</xsl:text>
	</xsl:template>
	<xsl:template name="copy">
		<xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
	</xsl:template>

	<!-- **********************************************************************
 Utility functions for generating head elements so that the XSLT processor
 won't add a meta tag to the output, since it may specify the wrong
 encoding (utf8) in the meta tag.
     ********************************************************************** -->
	<xsl:template name="plainHeadStart">
		<xsl:text disable-output-escaping="yes">&lt;head&gt;</xsl:text>
		<meta name="robots" content="NOINDEX,NOFOLLOW"/>
		<xsl:text>
  </xsl:text>
	</xsl:template>
	<xsl:template name="plainHeadEnd">
		<xsl:text disable-output-escaping="yes">&lt;/head&gt;</xsl:text>
		<xsl:text>
  </xsl:text>
	</xsl:template>


	<!-- **********************************************************************
 Utility functions for generating head elements with a meta tag to the output
 specifying the character set as requested
     ********************************************************************** -->
	<xsl:template name="langHeadStart">
		<xsl:text disable-output-escaping="yes">&lt;head&gt;</xsl:text>
		<meta name="robots" content="NOINDEX,NOFOLLOW"/>
		<xsl:choose>
			<xsl:when test="PARAM[(@name='oe') and (@value='utf8')]">
				<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='oe') and (@value!='')]">
				<meta http-equiv="content-type" content="text/html; charset={PARAM[@name='oe']/@value}"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_zh-CN')]">
				<meta http-equiv="content-type" content="text/html; charset=GB2312"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_zh-TW')]">
				<meta http-equiv="content-type" content="text/html; charset=Big5"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_cs')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_da')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_nl')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_en')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_et')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_fi')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_fr')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_de')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_el')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-7"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_iw')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-8-I"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_hu')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_is')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_it')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_ja')]">
				<meta http-equiv="content-type" content="text/html; charset=Shift_JIS"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_ko')]">
				<meta http-equiv="content-type" content="text/html; charset=EUC-KR"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_lv')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_lt')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_no')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_pl')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_pt')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_ro')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_ru')]">
				<meta http-equiv="content-type" content="text/html; charset=windows-1251"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_es')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:when test="PARAM[(@name='lr') and (@value='lang_sv')]">
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
			</xsl:when>
			<xsl:otherwise>
				<meta http-equiv="content-type" content="text/html; charset="/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:text>
  </xsl:text>
	</xsl:template>

	<xsl:template name="langHeadEnd">
		<xsl:text disable-output-escaping="yes">&lt;/head&gt;</xsl:text>
		<xsl:text>
  </xsl:text>
	</xsl:template>


	<!-- **********************************************************************
 Utility functions 
     ********************************************************************** -->

	<!-- *** Find the substring after the last occurence of a separator *** -->
	<xsl:template name="last_substring_after">

		<xsl:param name="string"/>
		<xsl:param name="separator"/>
		<xsl:param name="fallback"/>

		<xsl:variable name="newString"
		  select="substring-after($string, $separator)"/>

		<xsl:choose>
			<xsl:when test="$newString!=''">
				<xsl:call-template name="last_substring_after">
					<xsl:with-param name="string" select="$newString"/>
					<xsl:with-param name="separator" select="$separator"/>
					<xsl:with-param name="fallback" select="$newString"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$fallback"/>
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>

	<!-- *** Find and replace *** -->
	<xsl:template name="replace_string">
		<xsl:param name="find"/>
		<xsl:param name="replace"/>
		<xsl:param name="string"/>
		<xsl:choose>
			<xsl:when test="contains($string, $find)">
				<xsl:value-of select="substring-before($string, $find)"/>
				<xsl:value-of select="$replace"/>
				<xsl:call-template name="replace_string">
					<xsl:with-param name="find" select="$find"/>
					<xsl:with-param name="replace" select="$replace"/>
					<xsl:with-param name="string"
					  select="substring-after($string, $find)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$string"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<!-- **********************************************************************
 Display error messages
     ********************************************************************** -->
	<xsl:template name="error_page">
		<xsl:param name="errorMessage"/>
		<xsl:param name="errorDescription"/>

		<html>
			<xsl:call-template name="plainHeadStart"/>
			<title>
				<xsl:value-of select="$error_page_title"/>
			</title>
			<xsl:call-template name="style"/>
			<xsl:call-template name="plainHeadEnd"/>
			<body dir="ltr">

				<xsl:call-template name="my_page_header"/>

				<xsl:if test="$show_logo != '0'">
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td rowspan="3" valign="top">
								<xsl:call-template name="logo"/>
								<xsl:call-template name="nbsp3"/>
							</td>
						</tr>
					</table>
				</xsl:if>

				<xsl:call-template name="top_sep_bar">
					<xsl:with-param name="text" select="$sep_bar_error_text"/>
					<xsl:with-param name="show_info" select="0"/>
					<xsl:with-param name="time" select="0"/>
				</xsl:call-template>

				<p>
					<table width="99%" border="0" cellpadding="2" cellspacing="0">
						<tr>
							<td>
								<font color="#990000" size="+1">Bericht:</font>
							</td>
							<td>
								<font color="#990000" size="+1">
									<xsl:value-of select="$errorMessage"/>
								</font>
							</td>
						</tr>
						<tr>
							<td>
								<font color="#990000">Beschrijving:</font>
							</td>
							<td>
								<font color="#990000">
									<xsl:value-of select="$errorDescription"/>
								</font>
							</td>
						</tr>
						<tr>
							<td>
								<font color="#990000">Details:</font>
							</td>
							<td>
								<font color="#990000">
									<xsl:copy-of select="/"/>
								</font>
							</td>
						</tr>
					</table>
				</p>

				<hr/>

				<xsl:call-template name="my_page_footer"/>

			</body>
		</html>
	</xsl:template>

	<!-- **********************************************************************
 Swallow unmatched elements
     ********************************************************************** -->
	<xsl:template match="@*|node()"/>
</xsl:stylesheet>


<!-- *** END OF STYLESHEET *** -->
<!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->